WITH Console_Interface;
WITH Console_Interface.Menus;
WITH Ada.Directories;
WITH Ada.Text_IO;
WITH Ada.Strings.Unbounded;
WITH Application;

PROCEDURE Main IS




  Main_Menu          : Console_Interface.Menus.Menu;
  Current_Dir        : String := Ada.Directories.Current_Directory;
BEGIN
  -----------------------------
  --Init des constantes
  -----------------------------
  Application.Xml_Path := Ada.Strings.Unbounded.To_Unbounded_String(Current_Dir & "/../data/");


  -----------------------------
  --Creation du menu principal
  -----------------------------
  Console_Interface.Menus.Set_Name (Main_Menu, "Menu Principal :");
  Console_Interface.Menus.Add_Item (Main_Menu, "1", "Charger un reseau de petri au format XML", Application.Petrinet_Analysis'Access);
  Console_Interface.Menus.Add_Item (Main_Menu, "2", "Executer les tests unitaires", Application.Test_Suite'Access);
  Console_Interface.Menus.Add_Item (Main_Menu, "3", "A propos de l'application", Application.About'Access);

  Console_Interface.Menus.Add_Exit_Item (Main_Menu, "4", "Quitter");


  -----------------------------
  --Lancement de l'interface
  -----------------------------
  Console_Interface.Clear;
  Console_Interface.Put_Title ("Petrinet Analyzer");
  Console_Interface.Menus.Execute (Main_Menu);
  Console_Interface.Clear;

END Main;
